#define _CRT_SECURE_NO_WARNINGS 1

//#define MAX_SIZE 5
#include<stdio.h>

//
//int main()
//{
//	struct S
//	{
//		unsigned char a : 4;
//		unsigned char b : 2;
//		unsigned char c;
//		unsigned char d : 1;
//	}*s;
//	struct S* pointer = (struct S*)malloc(sizeof(struct S) * MAX_SIZE);
//	return 0;
//}



int main()
{
    unsigned char puc[4];
    struct t
    {
        unsigned char a;
        unsigned char b : 1;
        unsigned char c : 2;
        unsigned char d : 3;
    }*s;
    s = (struct t*)puc;
    memset(puc, 0, 4);
    s->a = 2;
    s->b = 3;
    s->c = 4;
    s->d = 5;
    printf("%02x %02x %02x %02x\n", puc[0], puc[1], puc[2], puc[3]);
    return 0;
}